package top.juntech.msweathercollection.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.juntech.msweathercollection.service.WeatherColletionSevice;

@RestController
@RequestMapping("/collection")
public class WeatherColllectionController {

    @Autowired
    private WeatherColletionSevice weatherDataCollectionService;

    @GetMapping
    public String collection(String uri){
        return weatherDataCollectionService.saveWeatherData(uri);
    }
}
